{% load static %}

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/vditor@3.6.0/dist/index.css"/>
    <script src="https://cdn.jsdelivr.net/npm/vditor@3.6.0/dist/method.min.js"></script>
    <link rel="stylesheet" href="{% static 'css/global.css' %}">
    <link rel="stylesheet" href="{% static 'css/news.css' %}">
    <title>covid-19_2.0</title>
</head>
<body class="bg">
<header class="top">
    <ul class="top-nav clearfix">
        <li><a href="/index">首页<br>Home</a></li>
        <li><a href="/prediction">&nbsp;预测系统<br>Prediction</a></li>
        <li><a href="/news">&nbsp;&nbsp;新闻报道<br>News Report</a></li>
        <li><a href="/research">相关研究<br>Research</a></li>
        <li><a href="/prevention">预防措施<br>Prevent</a></li>
        <li><a href="/platform">关于平台<br>Platform</a></li>
        <li><a href="/contact">&nbsp;联系我们<br>Connect us</a></li>
    </ul>
</header>

<section>
    <div id="father" class="container">
        <div class="section section-1">
            <div class="news">
                <div>
                    <div class="line_1">
                        <!--                    <p><a href="iframe/news_1" target="main">【中国新闻网】韩国新冠新增连续3天超30万例 政府预测疫情本周触顶</a></p>-->
                        <button type="button" onclick="loadXMLDoc1()">【中国新闻网】韩国新冠新增连续3天超30万例 政府预测疫情本周触顶</button>
                    </div>
                    <div class="line_1">
                        <!--                    <p><a href="iframe/news_2" target="main">【新华社】国家卫健委：在核酸检测基础上增加抗原检测作为补充</a></p>-->
                        <button type="button" onclick="loadXMLDoc2()">【新华社】国家卫健委：在核酸检测基础上增加抗原检测作为补充</button>
                    </div>
                </div>

                <div>
                    <div class="line_2">
                        <!--                    <p><a href="iframe/news_3" target="main">【上游新闻】欧洲新冠病例又上升，亚洲病例居高不下……专家担心全球疫情再次恶化</a></p>-->
                        <button type="button" onclick="loadXMLDoc3()">【上游新闻】欧洲新冠病例又上升，亚洲病例居高不下……专家担心全球疫情再次恶化</button>
                    </div>
                    <div class="line_2">
                        <!--                    <p><a href="iframe/news_4" target="main">【齐鲁网】德州市召开第四场新冠肺炎疫情防控工作新闻发布会</a></p>-->
                        <button type="button" onclick="loadXMLDoc4()">【齐鲁网】德州市召开第四场新冠肺炎疫情防控工作新闻发布会</button>
                    </div>
                </div>

            </div>
        </div>

        <div class="section section-2">
            <div id="myDiv" class="myDiv"><h3>点击显示新闻内容</h3></div>
            <div class="vditor-reset" id="preview">
                <h1>新闻推荐</h1>
                <p>●全球疫情动态【4月15日】：英国批准首款灭活新冠疫苗</p>
                <p>●WHO【4月16日】新冠恐重启，全球人口零免疫！新冠又一严重后遗症发现！</p>
                <p>●联合国报告【4月11日】新冠疫情使全球8.8亿多人去年陷入极端贫困</p>
                <p>●全球疫情动态【4月12日】：韩国发现首例XE毒株病例 德国约300万剂新冠疫苗临期</p>
            </div>
        </div>
    </div>
</section>

<script>
    function loadXMLDoc1() {
        var xmlhttp;
        if(window.XMLHttpRequest){
            xmlhttp=new XMLHttpRequest();
        }
        else{
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange=function()
        {
            if (xmlhttp.readyState==4 && xmlhttp.status==200)
            {
                document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
            }
        };
        xmlhttp.open("GET","iframe/news_1",true);
        xmlhttp.send();
        console.log("1");
    }
    function loadXMLDoc2() {
        var xmlhttp;
        if(window.XMLHttpRequest){
            xmlhttp=new XMLHttpRequest();
        }
        else{
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange=function()
        {
            if (xmlhttp.readyState==4 && xmlhttp.status==200)
            {
                document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
            }
        };
        xmlhttp.open("GET","iframe/news_2",true);
        xmlhttp.send();
    }
    function loadXMLDoc3() {
        var xmlhttp;
        if(window.XMLHttpRequest){
            xmlhttp=new XMLHttpRequest();
        }
        else{
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange=function()
        {
            if (xmlhttp.readyState==4 && xmlhttp.status==200)
            {
                document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
            }
        };
        xmlhttp.open("GET","iframe/news_3",true);
        xmlhttp.send();
    }
    function loadXMLDoc4() {
        var xmlhttp;
        if(window.XMLHttpRequest){
            xmlhttp=new XMLHttpRequest();
        }
        else{
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange=function()
        {
            if (xmlhttp.readyState==4 && xmlhttp.status==200)
            {
                document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
            }
        };
        xmlhttp.open("GET","iframe/news_4",true);
        xmlhttp.send();
    }
</script>

<script src="{% static 'js/jquery-3.4.1.min.js' %}"></script>
<script>
    const previewElement = document.getElementById('preview');
    Vditor.setContentTheme('light', 'https://cdn.jsdelivr.net/npm/vditor@3.6.0/dist/css/content-theme');
    Vditor.codeRender(previewElement, 'zh_CN');
    Vditor.highlightRender({"enable":true,"lineNumber":false,"style":"github"}, previewElement, 'https://cdn.jsdelivr.net/npm/vditor@3.6.0');
    Vditor.mathRender(previewElement, {
        cdn: 'https://cdn.jsdelivr.net/npm/vditor@3.6.0',
        math: {"engine":"KaTeX","inlineDigit":false,"macros":{}},
    });
    Vditor.mermaidRender(previewElement, 'https://cdn.jsdelivr.net/npm/vditor@3.6.0');
    Vditor.flowchartRender(previewElement, 'https://cdn.jsdelivr.net/npm/vditor@3.6.0');
    Vditor.graphvizRender(previewElement, 'https://cdn.jsdelivr.net/npm/vditor@3.6.0');
    Vditor.chartRender(previewElement, 'https://cdn.jsdelivr.net/npm/vditor@3.6.0');
    Vditor.mindmapRender(previewElement, 'https://cdn.jsdelivr.net/npm/vditor@3.6.0');
    Vditor.abcRender(previewElement, 'https://cdn.jsdelivr.net/npm/vditor@3.6.0');
    Vditor.mediaRender(previewElement);
</script>
</body>
</html>